<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <title>影院信息</title>
    <!-- Bootstrap -->
    <link th:href="@{../../static/css/bootstrap.css}" rel="stylesheet">
    <link th:href="@{../../static/css/bootstrap-theme.css}" rel="stylesheet">
</head>
<body>

    <!--顶部栏-->
    <div th:replace="business/top :: html"></div>

    <!-- 中间主体 -->
    <div class="container" id="content">
        <div class="row">
            <div th:replace="business/menu :: html"></div>

            <div class="col-md-10">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="row">
                            <h1 style="text-align: center;">修改影院信息</h1>
                        </div>
                    </div>
                    <div class="panel-body">
                        <form class="form-horizontal" role="form" th:action="@{/business/editCanema}"
                              id="editfrom" method="post">
                            <input type="hidden" class="form-control" name="canemaId"
                                   th:value="${canema.canemaId}">
                            <div class="form-group">
                                <label for="inputEmail2" class="col-sm-2 control-label">影院名称</label>
                                <div class="col-sm-10">
                                    <!--设置为disabled，则无法传递这个输入框的值-->
                                    <input type="text" class="form-control" id="inputEmail2" name="canemaName"
                                           placeholder="请输入影院名称" th:value="${canema.canemaName}"
                                           required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword2" class="col-sm-2 control-label">影院地址</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="inputPassword2" name="canemaAddress"
                                           placeholder="请输入影院地址" th:value="${canema.canemaAddress}"
                                           value="CodeTiger" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-2 control-label">联系方式</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="inputPassword3" name="canemaLine"
                                           placeholder="请输入联系方式" th:value="${canema.canemaLine}"
                                           value="CodeTiger" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">招牌</label>
                                <div class="col-sm-10">
                                    <img th:src="${canema.canemaImgUrl}" alt="招牌" readonly th:width="300px" th:height="300px">
                                </div>
                            </div>

                            <div class="form-group" style="text-align: center">
                                <button class="btn btn-success" type="submit" style="margin-right: 230px;">修改</button>
                                <button class="btn btn-danger" type="reset">重置</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container" id="footer">
        <div class="row">
            <div class="col-md-12"></div>
        </div>
    </div>


    <!--消息模态框-->
    <div class="modal fade" tabindex="-1" role="dialog" id="alertMsg">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-body">
                    <p th:text="${msg}" id="msgP"></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" data-dismiss="modal" onclick="javascript:go();">关闭
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script th:src="@{../../static/js/jquery-3.0.0.min.js}" type="text/javascript"></script>
    <script th:src="@{../../static/js/bootstrap.js}" type="text/javascript"></script>
    <script th:inline="javascript">

        $("#nav li:nth-child(3)").addClass("active");

        var msg = /*[[${msg}]]*/ null;

        if(msg != null) {
            // 显示信息
            $('#alertMsg').modal('show');
        }

        // 跳转到接口
        function go() {
            window.location.href = "/business/canema/info";
        }


    </script>
</body>
</html>